package com.qf.day2;


import java.util.Scanner;

/**
 * 输入两个值 积分 and 价格 返回 折扣后价值
 */
public class Demo1 {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入价格: ");
        double price = scanner.nextDouble();
        System.out.print("请输入积分: ");
        int num = scanner.nextInt();

        if(num<2000){
            price*=0.9;
        }else if(num>=2000 && num<4000){
            price*=0.8;
        }else if(num>=4000 && num<8000){
            price*=0.7;
        }else {
            price*=0.6;
        }
        System.out.println(price);
    }
}
